using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using QnA;

public partial class DeleteNews : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminClass admin = new AdminClass();
        admin.adminAuthenticate();

        if (!IsPostBack)
        {
            try
            {
                String id = Request.QueryString["id"];
                if (admin.deleteNews(Int32.Parse(id))) Response.Redirect("adminthongbao.aspx?id=xoathanhcong");                
            }
            catch (Exception se)
            {

                Response.Redirect("adminthongbao.aspx?id=xoathatbai");
            }


        }
    }
}
